<?php

class DefaultController extends BController
{
	public $layout='//layouts/backend-info';
	
	public function filters(){return array('rights');}
	
	public function allowedActions()
	{
		return 'error';
	}
	public function actionIndex()
	{
		$this->render('index');
	}
	
	public function actionError()
	{
		if($error=Yii::app()->errorHandler->error)
		{
			if(Yii::app()->request->isAjaxRequest)
				echo $error['message'];
			else {
				$this->pageTitle = Yii::t('backend', 'Lỗi: ') . strip_tags($error['message']);
				$this->render('error', $error);
			}
		}
	}
	
	public function actionHelp()
	{
		$this->render('help');
	}
	
	public function actionSubmitBug()
	{
		$this->render('submit_bug');
	}
}